package com.mikufufu.blog.service;

import com.mikufufu.blog.model.dto.ForgetPasswordParam;
import com.mikufufu.blog.model.dto.LoginEmailParam;
import com.mikufufu.blog.model.dto.LoginParam;
import com.mikufufu.blog.model.dto.api.RegisterParam;
import com.mikufufu.blog.model.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mikufufu.blog.model.vo.api.UserVO;
import com.mikufufu.blog.security.enums.Channel;

import javax.servlet.http.HttpServletResponse;

/**
 * 用户表 服务类
 * 
 */
public interface UserService extends IService<User>{


    /**
     * 用户登录
     * @param loginParam 登录信息
     * @param channel 登录渠道
     * @return Token
     */
    String login(LoginParam loginParam, Channel channel);

    String register(RegisterParam user);

    /**
     * 用户退出
     * @return 是否退出成功
     */
    Boolean logout();

    UserVO getUserVOById(Integer id);

    String loginEmail(LoginEmailParam loginEmailParam, Channel channel);

    boolean forgetPassword(ForgetPasswordParam forgetPasswordParam);

    void export(HttpServletResponse response);

    String generateInvitationCode();
}
